import 'package:flutter/material.dart';
import '../../../components/people_team.dart';

class Creator extends StatelessWidget {

  List members=[
    {"name":"dx","imgurl":"https://img1.doubanio.com/view/group_topic/l/public/p350891968.webp"},
    {"name":"xx","imgurl":"https://img1.doubanio.com/view/group_topic/l/public/p350891968.webp"},
    {"name":"xx","imgurl":"https://img1.doubanio.com/view/group_topic/l/public/p350891968.webp"},
    {"name":"...","imgurl":"https://img1.doubanio.com/view/group_topic/l/public/p350891968.webp"}
  ];

  @override
  Widget build(BuildContext context) {
    return Card(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.all(Radius.circular(20.0)),
        side: BorderSide(
          width: 0,
          color: Color.fromARGB(250, 211, 211, 211),
          style: BorderStyle.solid,
        ),
      ),
      elevation: 2,
      margin: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
      child: Container(
        padding: EdgeInsets.all(10),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
//              height: 5,
              padding: EdgeInsets.only(left: 5),
              decoration: BoxDecoration(
                border: Border(
                  left: BorderSide(
                    color: Colors.cyanAccent,
                    width: 2
                  )
                )
              ),
              child: Text(
                "创建者",
                style: TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 18,
                ),),
            ),
            SizedBox(height: 5,),
            Container(
              padding: EdgeInsets.only(left: 8),
              child: Row(
                children: this.members.map((e)=>e["name"]!="..."?Container(
                  margin: EdgeInsets.only(right: 28),
                  child: PeopleTeam(name: e["name"], imgurl: e["imgurl"],),
                ):Container(
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(100)
                  ),
                  margin: EdgeInsets.only(left: 8),
                  child: Text("...",
                    style: TextStyle(
                        fontWeight: FontWeight.bold,
                        fontSize: 30
                    ),
                  ),
                )).toList(),
              ),
            ),

          ],
        ),
      ),
    );
  }
}
